package com.woniu.command.handler;

import com.woniu.adapter.InventoryInoutAdapter;
import com.woniu.outlet.po.InventoryPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class InventoryCommandHandler {
    @Autowired
    private InventoryInoutAdapter inventoryInoutAdapter;

    public void projectIn(Integer id){
        inventoryInoutAdapter.projectIn(id);
    }

    public String finishPurchase(InventoryPo inventoryPo) {
        return inventoryInoutAdapter.finishPurchase(inventoryPo.getCode(), inventoryPo.getNum());
    }
    public Integer projectOut(String code,Integer num){
        return inventoryInoutAdapter.projectOut(code,num);
    }
}
